package org.yzl.designPatterns.factorymethod.ordinaryFactory;

import org.yzl.designPatterns.factorymethod.ordinaryFactory.impl.MailSenderImpl;

/**
 * 普通工厂模式
 */
public class SendFactory {
    public ISender produce(String sendType){
        if("mail".equals(sendType)){
            return new MailSenderImpl();
        }else if("message".equals(sendType)){
            return new MailSenderImpl();
        }else{
            System.out.println("请输入正确的类型");
            return null;
        }
    }
}
